import re

str = 'oncr isfsdfa sdfa onsr'
pat = re.compile(r'a$')
line = pat.findall(str)
print(line)